<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //1.赋值运算符
    let num = 1;
    num += 1; //就等于下面赋值 
    num = num + 1;
    console.log(num);
    //2.一元运算符
    num++ //后自增  先赋值后自增
    ++num //后自增  先自增后赋值  
    num-- //后自减  先赋值后自减
    --num //后自减  先自减后赋值  
    //3.比较运算符
    console.log(3 > 5);
    console.log(3 >= 3);
    console.log(3 == 3);
    console.log(3 == '3'); //ture  不同数据类型会发生隐式转换 特别是双等的情况下
    console.log(3 === '3'); //false   后面最好用三等 ===
    console.log(NaN == NaN); //false NaN不等于他自己
    console.log('a' > 'b'); //false  他们是按照ASCLL 进行比较
    //4.逻辑运算符
    //逻辑与 一假全假
    console.log(ture && ture); //ture
    console.log(ture && false); //false
    //逻辑或 一真则真
    console.log(ture || ture); //ture
    console.log(ture || false); //ture
    //逻辑非 取反 真变假 假变真
    console.log(!ture); //false
    console.log(!false); //ture

  </script>
</body>

</html>